package cn.csg.iotplatform.module.system.api.deviceno;

import cn.csg.iotplatform.framework.common.pojo.CommonResult;
import cn.csg.iotplatform.module.system.api.deviceno.dto.DeviceNoDTO;
import cn.csg.iotplatform.module.system.api.deviceno.dto.DeviceNoSaveDTO;
import cn.csg.iotplatform.module.system.api.deviceno.dto.ModelVO;
import cn.csg.iotplatform.module.system.api.manufacturer.dto.ManufacturerRespDTO;
import cn.csg.iotplatform.module.system.enums.ApiConstants;

import com.alibaba.fastjson.JSONObject;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import netscape.javascript.JSObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author Clqv
 * @create 2024--11--13 14:44
 */
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Tag(name = "终端型号同步至设备中心api")
public interface DeviceNoApi {

    String PREFIX = ApiConstants.PREFIX + "/deviceNo";

    @PostMapping(PREFIX + "/syncDeleteEqtDeviceModel")
    @Operation(summary = "同步终端型号至设备中心")
    CommonResult<Boolean> syncDeleteEqtDeviceModel(@RequestBody List<String> ids);

    @PostMapping(PREFIX + "/syncSaveEqtDeviceModel")
    @Operation(summary = "同步终端型号至设备中心")
    CommonResult<JSONObject> syncSaveEqtDeviceModel(@RequestBody DeviceNoSaveDTO deviceNoSaveDTO);

    @GetMapping(PREFIX + "/initSyncDeviceNoFile")
    @Operation(summary = "同步终端型号至设备中心")
    CommonResult<JSONObject> initSyncDeviceNoFile(@RequestBody List<DeviceNoDTO> deviceNoDTOS);
}
